﻿using UnityEngine;
using System.Collections;

/// <summary>
/// 技能
/// </summary>
[System.Serializable]
public class Skill {
    protected Actor master;
    public skillState state { get; protected set; }
    /// <summary>
    /// 技能名
    /// </summary>
    public string skillname = "技能";
    /// <summary>
    /// 能被打断
    /// </summary>
    public bool canStop = false;
    /// <summary>
    /// 动画名
    /// </summary>
    public string armatureName = Armature.STAND;
    /// <summary>
    /// 技能图标
    /// </summary>
    public Texture2D skillIcon = null;
    /// <summary>
    /// 前摇
    /// </summary>
    public float beforeCast = 0;
    /// <summary>
    /// 吟唱时间
    /// </summary>
    public float castTime = 0;
    /// <summary>
    /// 后摇
    /// </summary>
    public float afterCast = 0;
    
    public Skill(Actor master)
    {
        this.master = master;
        state = skillState.STOP;
    }

    public virtual bool doSkill()
    {
        return false;
    }
    public virtual bool stop()
    {
        return false;
    }
}

public enum skillState
{
    STOP=0, BEFORE=1,CAST=2,DO=3,AFTER=4
}